const express = require("express");

const app = express();

app.use((req, res, next) => {
  console.log("普通中间件 01");
  next();
});

app.get(
  "/home",
  (req, res, next) => {
    console.log("home路径和方法中间件 01");
    next();
  },
  (req, res, next) => {
    console.log("home路径和方法中间件 02");
    next();
  },
  (req, res, next) => {
    console.log("home路径和方法中间件 03");
    next();
  },
  (req, res, next) => {
    console.log("home路径和方法中间件 04");
    res.end();
  }
);

app.listen(8000, () => {
  console.log("连续注册中间件服务器启动成功~~~");
});
